#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = ''
__author__ = 'Dell'
__mtime__ = '2018-01-04'
# code is far away from bugs 
"""

import urllib2

enable_proxy = True
proxy_handel = urllib2.ProxyHandler({"http": "http://some-proxy:8080"})
null_proxy_handel = urllib2.ProxyHandler({})
if enable_proxy:
    opener = urllib2.build_opener(proxy_handel)
else:
    opener = urllib2.build_opener(null_proxy_handel)
urllib2.install_opener(opener)
